<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/order.js"></script>
<title>海外仓订单列表</title>
<script>
//海外仓订单已作废
function deposeOrderOversea() {
    var str = selectallpro();
    if (str != false) {
        var arr = str.split(',');
        var num = arr.length-1;
        if (confirm("确认选中的 [ "+num+" ]个订单，海外仓已作废?")) {
            $.post("/overseaapi/ajaxbutton", {"op": "deposeOrderOversea", "order_id": str},

                function (data) {
                    if (data.code == 200) {
                        alert(data.txt);
                        location.reload();

                    }
                    else {
                        alert(data.txt);
                        return;
                    }

                }, "json");
        }
    }
}
function sendMessaggeOversea() {
    var str = selectallpro();
    if (str != false) {
        var arr = str.split(',');
        var num = arr.length-1;
        if (confirm("确认选中的 [ "+num+" ]个订单，向相关人员发送消息?")) {
            $.post("/overseaapi/ajaxbutton", {"op": "sendMessaggeOversea", "order_id": str},

                    function (data) {
                        if (data.code == 200) {
                            alert(data.txt);
                            location.reload();
                        }
                        else {
                            alert(data.txt);
                            return;
                        }
                    }, "json");
        }
    }
}    
</script>
<body class="withvernav">
<div class="bodywrapper">
    {{include file='/public/orderleft.tpl'}}
    <div class="centercontent">
        <div class="pageheader notab">
            <h1 class="pagetitle">海外仓订单列表</h1>
            <span class="pagedesc"></span>
            <div class="menulist">
                <ul class="profile_summary">
                    <li {{if $status=="" && $current ==''}} class="current"{{/if}}> <a href="/overseaapi/showSendGoodsListOversea"><span>所有订单</span></a></li>
                    <li {{if $status==6}} class="current"{{/if}}> <a href="/overseaapi/showSendGoodsListOversea?status=6&flag=1"><span>作废</span></a></li>
                </ul>
            </div>
        </div>
        <!--pageheader-->
        <div id="contentwrapper" class="contentwrapper">
            <div id="basicform" class="subcontent">
                <!--搜索栏-->
                <div>
                    <div style="float:left">
                        <div style="padding:3px">
                            <ul class="buttonlist">
                                <li><button class="stdbtn btn_blue" onClick="deposeOrderOversea()">海外仓已作废</button></li>
                                <li><button class="stdbtn btn_blue" onClick="sendMessaggeOversea()">海外仓无法作废</button></li>
                            </ul>
                            </label>

                        </div>
                    </div>
                    <div style="clear: both"></div>
                    <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
                </div>

                <form class="stdform stdform2" method="get" id="search" action="/overseaapi/showSendGoodsListOversea">

                    <input type='hidden' name='ordersearchID' id='ordersearchID' value="{{$ordersearchID}}">
                    <div class="tableoptions">

                        <!--  <ul class="photosharing_menu">
            <li class="marginleft5 dropdown" id="actions">
                <a class="dropdown_label" href="#actions">
               {{if $ordersearchname}}{{$ordersearchname}}{{else}}订单搜索脚本{{/if}}
                <span class="arrow"></span>
                </a>
                <ul>

               {{foreach from=$ordersearch item=li key=key}}
                    <li><a href="javascript:void(0)" onClick="searchorder({{$li.id}})">{{$li.name}}</a></li>
                {{/foreach}}

                </ul>
            </li>
        </ul>
               -->
                        <select name="platformID" id="platformID"  class="selection select2_group" style="width:100px;" onChange="getshopName()" >
                            <option value="0" >平台</option>
                            {{foreach from=$platform item=li key=key}}
                            <option value="{{$li.id}}" {{if $platformID==$li.id}} selected{{/if}}>{{$li.name}}</option>
                            {{/foreach}}
                        </select>
                        <select name="shopID" id="shopname"  class="selection select2_group" style="width:150px;" >
                            <option value="" >店铺</option>
                            {{foreach from=$d_shop item=li key=key}}
                            <option value="{{$li.id}}" {{if $shopID==$li.id}} selected{{/if}}>{{$li.name}}</option>
                            {{/foreach}}
                        </select>

                        <select name="st" id="st">
                            <option value="">-订单属性-</option>
                            <option value="正常订单" {{if $st=='正常订单'}} selected{{/if}}>正常订单</option>
                            <option value="手工创建" {{if $st=='手工创建'}} selected{{/if}}>手工创建</option>
                            <option value="补发订单" {{if $st=='补发订单'}} selected{{/if}}>补发订单</option>
                            <option value="拆分订单" {{if $st=='拆分订单'}} selected{{/if}}>拆分订单</option>
                            <option value="手工上传" {{if $st=='手工上传'}} selected{{/if}}>手工上传</option>
                            <option value="未收到重发" {{if $st=='未收到重发'}} selected{{/if}}>未收到重发</option>
                            <option value="已收到重发" {{if $st=='已收到重发'}} selected{{/if}}>已收到重发</option>
                            <option value="部分退款" {{if $st=='部分退款'}} selected{{/if}}>部分退款</option>
                            <option value="全额退款" {{if $st=='全额退款'}} selected{{/if}}>全额退款</option>
                            <option value="退货订单" {{if $st=='退货订单'}} selected{{/if}}>退货订单</option>
                            <option value="即将到期订单" {{if $st=='即将到期订单'}} selected{{/if}}>即将到期订单</option>
                        </select>

                        </select>
                        <select name="status" id="status">
                            <option value="">-状态-</option>
                            <option value="1" {{if $status=='1'}} selected{{/if}}>新订单</option>
                            <option value="2" {{if $status=='2'}} selected{{/if}}>已支付</option>
                            <option value="3" {{if $status=='3'}} selected{{/if}}>配货中</option>
                            <option value="4" {{if $status=='4'}} selected{{/if}}>已发货</option>
                            <option value="5" {{if $status=='5'}} selected{{/if}}>已完成</option>
                            <option value="6" {{if $status=='6'}} selected{{/if}}>作废</option>
                        </select>
                        <select name="expresstype">
                            <option value="">-货运方式-</option>
                            {{foreach from=$expresstype item=li key=key}}
                            <option value="{{$li.id}}" {{if $expresstypeID==$li.id}} selected{{/if}}>{{$li.name}}</option>
                            {{/foreach}}
                        </select>
                        <select name="ty" id="searchtype" class="selection" style="width:100px;" >
                            <option value="1" {{if $ty==1}} selected{{/if}}>订单时间</option>
                            <option value="2" {{if $ty==2}} selected{{/if}}>导入时间</option>
                            <option value="3" {{if $ty==3}} selected{{/if}}>发货时间</option>
                        </select>
                        <input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
                        <select name="filtertype">
                            <option value="">-查询条件-</option>
                            <option value="order_sn" {{if $filtertype=='order_sn'}} selected{{/if}}>订单编号</option>
                            <option value="tradeid" {{if $filtertype=='tradeid'}} selected{{/if}}>交易单号</option>
                            <!-- <option value="sontradeid">子交易单号</option>
                             <option value="transactionid">transactionid</option>-->
                            <option value="productname" {{if $filtertype=='productname'}} selected{{/if}}>商品名称</option>
                            <option value="productid" {{if $filtertype=='productid'}} selected{{/if}}>商品编号</option>
                            <option value="customerid" {{if $filtertype=='customerid'}} selected{{/if}}>买家帐号(精确)</option>
                            <option value="custome" {{if $filtertype=='custome'}} selected{{/if}}>买家帐号</option>
                            <option value="consignee" {{if $filtertype=='consignee'}} selected{{/if}}>客户姓名</option>
                            <option value="email"  {{if $filtertype=='email'}} selected{{/if}}>客户Email</option>
                            <option value="tel" {{if $filtertype=='tel'}} selected{{/if}}>客户电话</option>
                            <option value="paypalmail" {{if $filtertype=='paypalmail'}} selected{{/if}}>Paypal ID</option>
                            <option value="shipping_number" {{if $filtertype=='shipping_number'}} selected{{/if}}>货运单号</option>
                            <option value="country" {{if $filtertype=='country'}} selected{{/if}}>国家(英)</option>
                            <option value="country_cn" {{if $filtertype=='country_cn'}} selected{{/if}}>国家(中)</option>
                            <option value="city"  {{if $filtertype=='city'}} selected{{/if}}>买家城市</option>
                            <option value="zipcode"  {{if $filtertype=='zipcode'}} selected{{/if}}>邮政编码</option>
                        </select>:<input type="text" name="kw" id="kw" class="width200" value="{{$kw}}" placeholder="关键词" />
                        &nbsp;
                        <button class="btn btn-primary" id="searchbtn">Search</button>
                        <input type='hidden' name='if_csv' id='if_csv'>
                        <input type='hidden' name='isow' id='isow'>
                        <input type='hidden' name='isno' id='isno'>
                        <input type='hidden' name='que' id='que'>
                    </div>


                </form>
                <!--搜索栏结束-->
                 <div class="x_content" style="overflow-x:auto;">
                <table cellpadding="0" cellspacing="0" border="0" class="stdtable" >
                    <thead>
                    <tr class="lbbt">
                        <td width="3%"  bgcolor="#FEFFF1"><a onClick="allSelect('ppid[]')">全选</a></td>
                        <td width="10%" bgcolor="#FEFFF1">订单编号</td>
                        <td width="5%" bgcolor="#FEFFF1">状态\订单属性</td>
                        <td width="3%" bgcolor="#FEFFF1">延迟</td>
                        <td width="10%"  bgcolor="#FEFFF1">店铺/客户/负责人</td>
                        <td width="10%" bgcolor="#FEFFF1">原金额/订单金额/总价</td>
                        <td width="7%" bgcolor="#FEFFF1">国家/国家(英)</td>
                        <td  bgcolor="#FEFFF1">自选物流<br/>货运方式<br/>货运单号</td>
                        <td  bgcolor="#FEFFF1" >订单日期/导入日期</td>
                        <td  bgcolor="#FEFFF1" >运费/交易号</td>
                        <td  bgcolor="#FEFFF1" >发货仓库</td>
                        <td  bgcolor="#FEFFF1" >海外仓是否已作废</td>
                    </tr>
                    </thead>
                    <tbody >
                    {{foreach from=$orderlist item=li key=key}}
                    <tr onDblClick="showOrderlistSell({{$li.order_id}},'{{$li.order_sn}}','{{$li.tradeid}}')" title="双击显示商品信息" style="cursor:pointer">
                        <td ><input name="ppid[]" type="checkbox" class="none" id="ppid[]" value="{{$li.order_sn}}" /></td>
                        <td valign="middle" style="position:relative;">
                            <a href="/orderlist/editorder?order_id={{$li.order_id}}" target="_blank"><font color="#6666FF">{{$li.order_sn}}</font></a>
                            <br>
                            {{if $li.is_nodelivery==0}}
                            <img title="可发货" src="/fuman/images/icons/g_cross_circle.png" alt="" width="16" height="16">
                            {{/if}}
                            {{if $li.is_nodelivery==1}}
                            <img title="禁止发货" src="/fuman/images/icons/cross_circle.png" alt="" width="16" height="16">
                            {{/if}}
                            {{if $li.is_que==1}}
                            <img title="缺货" src="/fuman/images/icons/alertflag.png" alt="">
                            {{/if}}
                            {{if $li.is_que==2}}
                            <img title="不缺货" src="/fuman/images/icons/g_alertflag.png" alt="">
                            {{/if}}
                            {{if $li.is_overweight==1}}
                            <img title="超重" src="/fuman/images/icons/orderweight.png" alt="">
                            {{/if}}
                            {{if $li.is_overweight==2}}
                            <img title="不超重" src="/fuman/images/icons/g_orderweight.png" alt="">
                            {{/if}}
                            <img src="/fuman/images/icons/g_mail.png" title="无买家Message信息" border="0">
                            {{if $li.platform_message}}
                            <img  src="/fuman/images/icons/ebaynote.png" title="{{$li.platform_message}}">
                            {{else}}
                            <img title="无平台留言" src="/fuman/images/icons/g_ebaynote.png" alt="">
                            {{/if}}

                            {{if $li.remark}}
                            <img src="/fuman/images/icons/content.png" title="{{$li.remark}}">
                            {{else}}
                            <img title="无备注" src="/fuman/images/icons/g_content.png" alt="">
                            {{/if}}

                        </td>
                        <td valign="middle"><img src="/fuman/images/icons/flag_{{$li.order_status}}.gif">{{$li.statustext}}<br>{{$li.order_source}}</td>
                        <td valign="middle">{{$li.numday}}天</td>

                        <td style="position:relative;">

                            <div style="margin-left:2px;">  {{$li.shopname}} （{{$li.shopoper}}）
                                <br>{{$li.customerid}}
                            </div>

                            <div class="lbcp">
                            </div>
                        </td>
                        <td valign="middle">{{$li.moneytype}} {{$li.goods_originask}}<br>RMB {{$li.goods_amount}}<br>RMB {{$li.goods_total}} </td>
                        <td valign="middle">{{$li.country}}<br>{{$li.country_cn}}</td>
                        <td class="cz">{{$li.postageservice}}<br>{{$li.shipping_name}}<br>{{$li.shipping_number}}</td>
                        <td class="cz">{{$li.ordertime}}<br>{{$li.add_time}}</td>
                        <td class="cz">{{if $li.shipping_fee=='0.00'}}{{else}}<font color="#FF0000">{{$li.shipping_fee}}</font>{{/if}}<br>{{$li.tradeid}}</td>
                        <td class="cz">
                            {{if $li.shipping_status==0}}
                                一号仓
                            {{/if}}
                            {{if $li.shipping_status==1}}
                            英华英国仓
                            {{/if}}
                            {{if $li.shipping_status==2}}
                           英华德国仓
                            {{/if}}
                            {{if $li.shipping_status==3}}
                            美国仓
                            {{/if}}
                        </td>
                        <td class="cz">
                            {{if $li.del_flag eq 1}}
                            <span style="color:red;">已作废</span>
                            {{/if}}
                            {{if $li.del_flag eq 3}}
                                <span style="color:red;" >已处理</span>
                            {{/if}}
                            {{if $li.del_flag eq 0}}
                                未作废
                            {{/if}}
                        </td>
                    </tr>
                    {{/foreach}}
                    </tbody>

                </table>
                </div>
                <div class="page">{{$showmemorygetusage}}{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
            </div>
        </div>
</body>
</html>